# +----------------------------------------------------------------------
# | ChatWork智能聊天办公系统
# +----------------------------------------------------------------------
# | 软件声明: 本系统并非自由软件,未经授权任何形式的商业使用均属非法。
# | 版权保护: 任何企业和个人不允许对程序代码以任何形式任何目的复制/分发。
# | 授权要求: 如有商业使用需求,请务必先与版权所有者取得联系并获得正式授权。
# +----------------------------------------------------------------------
# | Author: ChatWork Team <2474369941@qq.com>
# +----------------------------------------------------------------------
from fastapi import Query
from pydantic import BaseModel, Field


class NoticeSearchIn(BaseModel):
    """ 消息搜索参数 """
    page_no: int = Query(default=1, gt=0, description="当前页码")
    page_size: int = Query(default=15, gt=0, description="每页条数")


class NoticeIdIn(BaseModel):
    """ 消息ID参数 """
    id: int = Field(default=0, ge=0, description="消息ID")

    class Config:
        json_schema_extra = {
            "example": {
                "id": 1
            }
        }


"""--------------- Separator ---------------"""


class NoticeListVo(BaseModel):
    """ 通知消息列表Vo """
    scene: int = Field(description="通知场景")
    title: str = Field(description="通知标题")
    content: str = Field(description="通知内容")
    is_read: int = Field(description="已读状态: [0=未读, 1=已读]")
    create_time: str = Field(description="通知时间")

    class Config:
        json_schema_extra = {
            "example": {
                "scene": 100,
                "title": "this is notice title",
                "content": "this is notice content",
                "is_read": 0,
                "create_time": "2023-10-01 11:12:00"
            }
        }
